package com.ym521.simple;

import android.os.Bundle;
import android.util.Log;
import android.view.View;

import androidx.appcompat.app.AppCompatActivity;

import com.custom.titlebar.base.ClickedAction;
import com.custom.titlebar.widget.CommonTitleBar;
import com.ym521.simple.databinding.ActivityMainBinding;

public class MainActivity extends AppCompatActivity implements CommonTitleBar.OnTitleBarListener {
   private ActivityMainBinding viewBind;
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        viewBind = ActivityMainBinding.inflate(getLayoutInflater());
        setContentView(viewBind.getRoot());
        viewBind.ctbTest.setListener(this);
        viewBind.ctbTest.showCenterProgress();
        viewBind.ctbTest.postDelayed(() -> {
            viewBind.ctbTest.dismissCenterProgress();
        },3000);

    }


    @Override
    public void onClicked(View v, ClickedAction action, String extra) {
        Log.e("onClicked",action.name());
    }
}